﻿// This code is released under the BSD license.
namespace PugLib.UnitTest
{
    #region

    using Functional;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    #endregion

    /// <summary>
    ///This is a test class for MapReduceTest and is intended
    ///to contain all MapReduceTest Unit Tests
    ///</summary>
    [TestClass]
    public class MapReduceTest
    {
        /// <summary>
        ///A test for Sum
        ///</summary>
        [TestMethod]
        public void SumTest()
        {
            int[] arr = new[] { 1, 2, 3 };
            const int expected = 6;
            int actual = MapReduce.Sum(arr);
            Assert.AreEqual(expected, actual);
        }
    }
}